<?php
// No direct access
defined('_JEXEC') or die;

/**
 *Jenerator joomprosub Controller
 *
 * @package		Joomla.Administrator
 * @subpackage	com_jenerator
 */
class JeneratorController extends JController
{
	/**
	 * @var		string	The default view.
	 * @since	1.6
	 */
	protected $default_view = 'articles';

	/**
	 * Method to display a view.
	 *
	 * @param	boolean			$cachable	If true, the view output will be cached
	 * @param	array			$urlparams	An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
	 *
	 * @return	JController		This object to support chaining.
	 */
	public function display($cachable = false, $urlparams = false)
	{
		JLoader::register('JeneratorHelper', JPATH_COMPONENT.'/helpers/jenerator.php');

		// Load the submenu.
		JeneratorHelper::addSubmenu(JRequest::getCmd('view', 'articles'));

		$view = JRequest::getCmd('view', 'articles');
		$layout	= JRequest::getCmd('layout', 'default');
		$id = JRequest::getInt('id');

		parent::display();

		return $this;
	}
}